Sensing apparatus and method

ABSTRACT

A method of detecting one or more blocked sampling holes in a pipe of an aspirated smoke detector system. The method includes ascertaining the base flow of fluid through a particle detector using a flow sensor; monitoring subsequent flow through the particle detector; comparing the subsequent flow with the base flow; and indicating a fault if the difference between the base flow and the subsequent flow exceeds a predetermined threshold.

RELATED APPLICATIONS

This application is a continuation application of U.S. patentapplication Ser. No. 10/556,482, filed Nov. 14, 2005, which is a 371 ofPCT/AU04/00639, filed May 14, 2004, which claims priority to AustralianProvisional Patent Application no. 2003902318, filed 14 May 2003 andentitled “Improved Sensing Apparatus and Method” and, the specificationthereof is incorporated herein by reference in its entirety and for allpurpose.

FIELD OF INVENTION

The present invention relates to the field of sensing apparatus. Inparticular, the present invention relates to an improved particledetector and method for detecting particles in air. In one form, theinvention relates to an improvement in particle detectors and anassociated method of detecting particles in air sampled from a number oflocations. It will be convenient to hereinafter describe the inventionin relation to the use of an ultrasonic means of flow sensing within anaspirated smoke detector system, however, it should be appreciated thatthe present invention may not be limited to that use, only.

RELATED ART

The inventor has identified the following related art. Particledetectors are useful in detecting smoke particles in an airstream as ameans of determining whether a location may contain a thermal event.Sensitive smoke detectors, such as the VESDA™ LaserPlus™ smoke detectorsold by Vision Fire and Security Pty Ltd, detect the number of particlesin an airstream. Typical thermal events, such as combustion, producesignificant quantities of airborne particles, and therefore detectingthese particles is useful in determining whether there may be a thermalevent in a particular location. One type of smoke detector system uses asampling network of pipes, each pipe having a number of apertures alongits length. The pipe network is connected to a particle detector, and anaspirator draws air through the pipes and into a particle detectingchamber. Using a pipe network, air may be sampled from a number ofdifferent points over an area. To maintain and improve upon theefficiency and effectiveness of an aspirated smoke detector system, itis desirable to determine flow through the pipe network. By way ofexample, flowmeters suitable for determining the flow of a fluid,ordinarily in liquid state, through a fluid carrying pipe are disclosedin the following references.

WO 88/08516 (Micronics Limited), entitled “Ultrasonic Fluid Flowmeter”discloses a non-intrusive ultrasonic flowmeter operating on theprinciple of time-of-flight measurement, comprising a first mountingblock having a first fixed transducer being oriented to direct anultrasonic pulse at an angle to the axis of fluid flow in a pipe. Asecond transducer within the first mounting block is angled to direct anultrasonic pulse in a direction perpendicular to the axis of flow. Athird transducer is fixed within a second block at a distance from thefirst block and is oriented to intercept the direct or reflectedacoustic path of a pulse transmitted by the first transducer. Anempirical calculation of the time of flight of the pulse from the firstto the third transducers is carried out using direct output signals fromthe transducers, which allows for a determination of the flow rate ofthe fluid. However, this empirically determined flow rate is notaccurate and is corrected for variation in the propagation rate of thetransmitted ultrasound pulses by deriving a correlation factor from theoutput signal of the second transducer.

U.S. Pat. No. 5,052,230 (Lang et al), entitled “Method and Arrangementfor Flow Rate Measurement by Means of Ultrasonic Waves” discloses amethod and apparatus for determining the flow rate of a liquid in ameasuring tube which comprises digitally measuring the total phase shiftthat will naturally occur between a transmitted waveform and a receivedwaveform of an ultrasonic signal being transmitted and having to travela distance before it is received within an arrangement comprising twotransducers spaced apart on the measuring tube. According to Lang et al,the flow velocity is first determined using known values of thefrequency of the ultrasonic wave and the distance between the twotransducers and by calculating the difference between the total phaseshifts obtained in relation to the ultrasonic signal propagated firstlyin the direction of flow and then against the direction of flow. Theflow rate of the liquid is then determined by multiplying the determinedflow velocity by the known flow cross-sectional area of the measuringtube. Lang et al recognises that the total angular phase shift between atransmitted and received ultrasonic signal is made up of the number ofwhole wavelengths of the ultrasonic signal between the two transducersand any residual phase angle. The method and apparatus of Lang et altherefore provides a two part solution in which a first arrangement isused to determine the number of whole wavelengths disposed in themeasuring tube and, a second arrangement is used to determine theresidual or exact phase angle between the transmitted and receivedsignal. It is noted that Lang et al uses digital pulse countingtechniques to determine measurement intervals in each part of its twopart solution and discloses improvements to the pulse counting accuracyin each part of the disclosed solution. In the whole wavelengthdetermination full wave rectification of the received signal isperformed in order to have the received signal exceed a threshold forstopping the pulse counter earlier than an unrectified signal. In theresidual phase angle determination, firstly the start phase of acounting frequency signal is varied at the beginning of each countingoperation to overcome quantization errors and secondly, where very smallresidual angles are detected, the digital equivalent of either thetransmitted or received signal is inverted thereby adding 180° to thephase angle and thus the duration of a measuring pulse iscorrespondingly longer for greater resolution. The phase inverting steprequires a corresponding delay to be introduced to the non-invertedsignal, ether the received or transmitted signal, in order to compensatefor the delay caused by the inverter. The whole wavelength determinationis limited by an accurate determination of the onset of the arrival ofthe received ultrasonic signal.

U.S. Pat. No. 5,533,408 (Oldenziel et al), entitled “Clamp-On UltrasonicVolumetric Flowmeter”; discloses a dual mode clamp-on ultrasonicvolumetric flowmeter comprising at least one pair of ultrasonictransducers on the outside surface of a pipe carrying a fluid to bemeasured in which a time-of-flight measurement principle or acorrelation technique are selected depending on whether foreignparticles are present in the fluid. Oldenziel et al discloses animprovement in which based on a threshold signal derived from anintegrated signal of one of the transducers, a user may preset or selecta foreign particle content in the fluid at which to changeover fromtravel time measurement to correlation measurement,

U.S. Pat. No, 6,351,999 (Maul et al), entitled “Vortex Flow Sensor”discloses a sensor for measuring flow velocity and/or flow rate of afluid in which turbulent flow is introduced into the fluid by way of abluff body fixedly disposed along a tube diameter for generating Karmanvortices, whose frequency is proportional to the fluid flow velocity.The sensor disclosed by Maul et al is an optical sensor systemcomprising a laser differential interferometer.

A method and apparatus of more general application is disclosed in U.S.Pat. No. 5,983,730 (Freund et al), entitled “Method and Apparatus forMeasuring the Time of Flight of a Signal”. Freund et al is directed tothe problem of accurately measuring the time of flight of a signal inparticular applications where the precision of less than one period ofthe signal is required such as in flow, level, speed of sound andacoustic impedance measurements. Accordingly, Freund et al discloses amethod and apparatus comprising the steps of receiving a transmittedsignal and detecting the onset of the signal as it arrives by way ofperforming a set of operations upon the received signal to provide adiscriminated received signal having a critical point that may be usedto determine the time of flight of the transmitted signal. The intensivesignal processing operations of Freund et al concentrate on the receivedsignal. Freund et al does not disclose any processing operations for thesignal as it is transmitted nor any treatment of the transmitted signalwaveform before it is received.

U.S. Pat. No. 5,178,018 (Gill) discloses a measurement system formeasuring the time for a signal to pass between two transducers to allowthe determination of the fluid flow of a gas, as in a gas meter forexample. A signal with a phase change acts as a marker, which istransmitted from one transducer and received by another transducer. Onreceipt, the phase change marker is detected and is used in conjunctionwith corresponding amplitude information in the received signal tocalculate a time of travel of the signal and hence flow rates of thefluid. The system of Gill requires very high bandwidth transducers alongwith expensive and powerful drive circuitry in order to providesufficient signal output to overcome background and other noise withinflow systems. It is also noted that transducer temperature changes alterthe phase and frequency response of the transducers.

Any discussion of documents, devices, acts or knowledge in thisspecification is included to explain the context of the invention. Itshould not be taken as an admission that any of the material forms apart of the prior art base or the common general knowledge in therelevant art in Australia or elsewhere on or before the priority date ofthe disclosure and claims herein.

SUMMARY OF INVENTION

In one aspect the present invention provides a method of determining thetime of flight of a signal transmitted between a transmitter and areceiver, said method comprising the steps of:

transmitting a first signal comprising at least one characteristicwaveform feature;

transmitting a second signal comprising at least one characteristicwaveform feature and a waveform modification introduced at apredetermined point in time of the duration of the second signal;

receiving said first and second transmitted signals;

determining a point of diversion between corresponding characteristicwaveform features of the first and second received signals comprisingsuper positioning said first and second received signals such that saidpoint of diversion corresponds to an arrival time of the introducedwaveform feature modification at the receiver.

The determined point of diversion advantageously resolves ambiguitiesassociated with similar characteristic features cyclically present inthe received waveform. In other words, the characteristic feature of asignal generated at the transmitter which corresponds to thepredetermined point in time at which the waveform modification isintroduced may be clearly distinguished from other such characteristicfeatures that may recur cyclically throughout the transmitted signal.Once a point of diversion of a second signal of the modified type withrespect to a first signal of the unmodified type is determined at thereceiver then this point in time may be confidently determined as thetime of arrival of not only the received signal burst but the arrivaltime of a specific portion of the signal burst with a resolution of lessthan a single cycle within the burst and being of the order of theduration of a characteristic waveform feature.

In essence the present invention stems from the realisation that adetermination of the arrival time of a signal is readily ascertainedwhen a signal with a portion specifically modified is overlaid in timerelative to an unmodified signal. This solution obviates the need forsophisticated electronics used to find a predetermined marker buriedwithin a given received signal transmission, which manifests itself asan unpredictable received signal waveform distortion that is alsosubject to further distortions due to system and component noise,instabilities and other uncertainties. By making a relative measurementat the receiver, the present invention cancels these distortions anduncertainties to the extent that the only diversion manifested between asecond modified and a first unmodified signal is the introduced waveformmodification of the second signal placed, as it may be, at apredetermined location of the second signal for ease of timingreference.

In the preferred embodiment, once the diversion point is used tounambiguously determine the time of flight of the received signal, thecharacteristic feature of the first unmodified signal corresponding tothe location of the diversion point may be subsequently used to guidethe selection and measurement of a characteristic waveform feature of aplurality of transmitted signals of the first unmodified signal typewithout further reference to the diversion point. This characteristicfeature of the first signal type may thereafter be tracked in subsequentunmodified signals to allow for variations due to flow, temperature andother physical effects.

In another aspect the present invention provides apparatus adapted todetermine the time of flight of a signal transmitted between atransmitter and a receiver, said apparatus comprising:

processor means adapted to operate in accordance with a predeterminedinstruction set,

said apparatus, in conjunction with said instruction set, being adaptedto perform the method of determining the time of flight of a signaltransmitted between a transmitter and a receiver as disclosed herein.

In yet another aspect the present invention provides a method ofmonitoring flow through a particle detector of an aspirated smokedetector system, the method comprising the steps of:

ascertaining the base flow of fluid through a particle detector using aflow sensor;

monitoring subsequent flow through the particle detector;

comparing the subsequent flow with the base flow, and indicating a faultif the difference between the base flow and the subsequent flow exceedsa predetermined threshold wherein base flow and subsequent flow aredetermined at respective times according to the following general flowcalculation:

f=s×A

where f=volumetric flow;

A=cross sectional area of an air flow path through the detector system;

s=speed of air through the detector system such that s is given by;

$s = {\frac{d}{2}\left( {\frac{1}{t_{2}} - \frac{1}{t_{1}}} \right)}$

where t₁ is the transit time of a signal transmitted in a forwarddirection, being generally in the direction of flow, from a firsttransducer located adjacent the flow path to a second transducer locatedgenerally opposite the first transducer and adjacent the flow path;

t₂ is the transit time of a signal transmitted in a reverse direction,being generally against the direction of flow, from the secondtransducer to the first transducer;

d is a distance travelled by the signal between the first and secondtransducer;

and wherein both t₁ and t₂ are determined in accordance with a method ofdetermining the time of flight of a signal transmitted between the firsttransducer acting as a transmitter and the second transducer acting as areceiver as disclosed herein.

In still another aspect the present invention provides apparatus adaptedto monitor flow through a particle detector of an aspirated smokedetector system, said apparatus comprising:

processor means adapted to operate in accordance with a predeterminedinstruction set,

aid apparatus, in conjunction with said instruction set, being adaptedto perform a method of monitoring flow through a particle detector of anaspirated smoke detector system as disclosed herein.

In yet a further aspect the present invention provides a method ofdetermining the time of flight of a signal transmitted between atransmitter and a receiver, said method comprising the steps of:

a) transmitting a first and a second signal, where both signals compriseat least one characteristic waveform feature and the second signalfurther comprises a waveform modification introduced at a predeterminedpoint in time of the duration of the second signal;

b) receiving said first and second transmitted signals;

c) scanning through said received signals in time to determine a pointof diversion between corresponding characteristic waveform features ofthe first and second received signals, wherein said point of diversioncorresponds to a time of reception of the introduced waveform featuremodification at the receiver.

In a preferred embodiment, the following steps are performed after theabove scanning step as part of the determination of the point ofdiversion:

d) for each characteristic waveform feature of the first received signalcalculating the difference between a value of the first received signaland a corresponding value of the second received signal;

e) designating the first point of occurrence at which the calculateddifference is greater than the value of the second received signal as apoint of diversion.

Similarly, in a preferred embodiment, at least one or more of thefollowing steps are performed after the above designating step todetermine the time of flight of a signal:

f) calculating the difference between the time of the point of diversionand the time of transmission of the introduced waveform featuremodification;

g) measuring a time relationship between a nominated characteristicwaveform feature and the point of diversion and calculating thedifference between the time of reception and the time of transmission ofthe nominated characteristic waveform feature.

In an embodiment of the invention with respect to step g) describedabove, thereafter for subsequent transmitted first unmodified signals,the time of flight may be determined by calculating the differencebetween the time of reception and the time of transmission of thenominated characteristic waveform feature of the subsequent firstsignals without reference to the point of diversion. The nominatedcharacteristic waveform feature may be locked onto and tracked to allowfor variations in arrival time due to physical changes in the transportmedium between transducers such as temperature, density etc.

In a preferred embodiment the present invention provides a method ofdetermining the time of flight of a signal as herein disclosed whichfurther comprises the steps of:

selecting a characteristic waveform feature of a first signal inaccordance with predetermined selection criteria based on the point ofdiversion;

transmitting and receiving a plurality of first signals;

detecting zero-crossings of the received plurality of first signalswhich indicate the presence of the selected characteristic waveformfeature in each of the received plurality of first signals;

estimating a position of the selected characteristic waveform feature ofthe received plurality of first signals in accordance with predeterminedestimation criteria based on the detected zero-crossings to provide aposition estimation value;

processing the position estimation value to determine a correspondingestimation time;

calculating the time of arrival of the selected characteristic waveformfeature of at least one of the plurality of received first signals byadding a predetermined delay time to the estimation time.

In this preferred embodiment, the predetermined selection criteria maycomprise one of:

a) adding a predefined delay to the time of the point of diversion;

b) subtracting a predefined delay from the time of the point ofdiversion.

Further, in the preferred embodiment the predetermined estimationcriteria may comprise:

a) measuring the time of zero-crossings adjacent the selectedcharacteristic waveform feature and;

b) averaging the measured time of zero-crossings.

The zero-crossings adjacent the selected characteristic waveform featuremay occur on each side of the selected feature in time.

In the preferred embodiment the present invention provides apparatusadapted to determine the time of flight of a signal transmitted betweena transmitter and a receiver, said apparatus comprising:

processor means adapted to operate in accordance with a predeterminedinstruction set, said apparatus, in conjunction with said instructionset, being adapted to perform the method of determining the time offlight of a signal as disclosed hereinabove wherein said apparatuscomprises:

signal transducing means for transmitting and receiving a plurality offirst signals;

waveform feature selection means operatively connected to the signaltransducing means and the processor means for selecting a characteristicwaveform feature of a first signal in accordance with predeterminedselection criteria based on the point of diversion;

zero-crossing detection means operatively connected to transducing meansand the processor means for detecting zero-crossings of the receivedplurality of first signals which indicate the presence of the selectedcharacteristic waveform feature in each of the received plurality offirst signals;

signal position estimation means operatively connected to thezero-crossing detection means and the processor means for estimating aposition of the selected characteristic waveform feature of the receivedplurality of first signals in accordance with predetermined estimationcriteria based on the detected zero-crossings to provide a positionestimation value;

wherein the processor means processes the position estimation value todetermine a corresponding estimation time and calculates the time ofarrival of the selected characteristic waveform feature of at least oneof the received plurality of first signals by adding a predetermineddelay time to the estimation time.

The signal position estimation means may comprise a dual slopeintegrator. In an alternate embodiment, the received plurality of firstsignals are digitised and said processor means comprises digital dataprocessing means comprising the zero-crossing detection means and thesignal position estimation means.

In yet a further aspect the present invention provides a method ofdetecting one or more blocked sampling holes in a pipe of an aspiratedsmoke detector system comprising:

ascertaining the base flow of fluid through a particle detector using aflow sensor;

monitoring subsequent flow through the particle detector;

comparing the subsequent flow with the base flow, and indicating a faultif the difference between the base flow and the subsequent flow exceedsa predetermined threshold.

In another aspect the present invention provides an aspirated smokedetector comprising a particle detector, a sampling network and anaspirator, an inlet, an outlet and a flow sensor, wherein the flowsensor uses ultrasonic waves to detect the flow rate of air entering theparticle detector.

In one embodiment of the present invention there is provided a computerprogram product comprising:

a computer usable medium having computer readable program code andcomputer readable system code embodied on said medium for monitoringflow through a particle detector of an aspirated smoke detector systemwithin a data processing system, said computer program productcomprising:

computer readable code within said computer usable medium for performingthe method of monitoring flow through a particle detector of anaspirated smoke detector system as disclosed herein.

In another embodiment of the present invention there is provided acomputer program product comprising:

a computer usable medium having computer readable program code andcomputer readable system code embodied on said medium for determiningthe time of flight of a signal transmitted between a transmitter and areceiver within a data processing system, said computer program productcomprising:

computer readable code within said computer usable medium for performingthe method of determining the time of flight of a signal transmittedbetween a transmitter and a receiver as disclosed herein.

In yet a further embodiment of the present invention there is provided acomputer program product comprising:

a computer usable medium having computer readable program code andcomputer readable system code embodied on said medium for detecting oneor more blocked sampling holes in a pipe of an aspirated smoke detectorsystem within a data processing system, said computer program productcomprising:

computer readable code within said computer usable medium for performingthe method of detecting one or more blocked sampling holes of anaspirated smoke detector system as disclosed herein.

Other preferred forms, aspects and embodiments are disclosed in thespecification and/or defined in the appended claims, forming a part ofthe description of the invention.

Further scope of applicability of the present invention will becomeapparent from the detailed description given hereinafter. However, itshould be understood that the detailed description and specificexamples, while indicating preferred embodiments of the invention, aregiven by way of illustration only, since various changes andmodifications within the spirit and scope of the invention will becomeapparent to those skilled in the art from this detailed description.

BRIEF DESCRIPTION OF THE DRAWINGS

Further disclosure, improvements, advantages, features and aspects ofthe present invention may be better understood by those skilled in therelevant art by reference to the following description of preferredembodiments taken in conjunction with the accompanying drawings, whichare given by way of illustration only, and thus are not limiting to thescope of the present invention, and in which:

FIG. 1 shows a schematic arrangement of an embodiment of a sensingapparatus for a smoke detector system;

FIG. 2 shows a schematic of an embodiment of a flow sensor arrangementfor a sensing apparatus as shown in FIG. 1 ;

FIG. 3 shows an embodiment of an integrator circuit and waveform outputof a controller for a flow sensor as shown in FIG. 2;

FIG. 4 shows a schematic of the circuit components of a controller andflow sensor of the sensing apparatus of FIG. 1 ;

FIG. 5 shows the waveforms of signals received by the flow sensor of thesensing apparatus of FIG. 1;

FIG. 6 shows an embodiment of a flow sensor arrangement in whichtime-of-flight measurements are performed;

FIGS. 7 a and 7 b show embodiments of flow sensor transducerarrangements used for time-of-flight measurements;

FIG. 8 shows an embodiment of a transducer reflector arrangement;

FIG. 9 shows a schematic circuit block diagram of a sensing arrangementin accordance with an embodiment of the invention;

FIG. 10 shows an embodiment of a transducer driver configuration;

FIG. 11 shows example waveforms of driver circuits for transducers inaccordance with an embodiment of the invention and illustrating acomparison of the phase of the active drive circuit arrangementwaveforms;

FIG. 12 is a circuit diagram showing a receiving transducer selector forselecting signal A from transducer A of two transducers A and B in aflow sensor arrangement in accordance with an embodiment of theinvention;

FIG. 13 is the circuit diagram of FIG. 12 showing the selectorconfigured to select signal B from transducer B of two transducers A andB in accordance with an embodiment of the invention;

FIG. 14 is a circuit block diagram of a receiver amplifier for a flowsensor arrangement in an embodiment of the invention;

FIG. 15 shows peak detector waveforms for a peak detector of a flowsensor arrangement in accordance with an embodiment of the invention;

FIG. 16 is a circuit diagram of a peak detector of a flow sensorarrangement in accordance with an embodiment of the invention;

FIG. 17 is a circuit diagram of an averaging circuit for setting azero-crossing reference level of a flow sensor arrangement in accordancewith an embodiment of the invention;

FIG. 18 is a circuit diagram of the averaging circuit of FIG. 17 in moredetail showing a low-pass filter circuit arrangement;

FIG. 19 is an illustration of waveforms of a zero-crossing detectorcircuit of a flow sensor arrangement in accordance with an embodiment ofthe invention;

FIG. 20 shows a circuit diagram of an integrator circuit used in a pulseposition detector of a flow sensor arrangement in accordance with anembodiment of the invention;

FIG. 21 shows four operating states of the integrator circuit of FIG.20;

FIG. 22 shows a circuit diagram of the integrator circuit of FIG. 20with an exemplary control circuit;

FIG. 23 shows waveforms of the integrator circuit of FIG. 20;

FIG. 24 shows a software context diagram of a flow sensor arrangement inaccordance with an embodiment of the invention;

FIG. 25 is a flow chart of an overall program used in the operation of aflow sensing arrangement in accordance with an embodiment of theinvention;

FIG. 26 shows an exemplary pulse train of an ultrasonic transmitter inaccordance with an embodiment of the invention;

FIG. 27 shows exemplary waveforms for driving transducers of a flowsensor arrangement in accordance with an embodiment of the invention;

FIG. 28 shows waveforms appearing at a receiving transducer and peakdetector of a flow sensor arrangement in accordance with an embodimentof the invention;

FIG. 29 shows exemplary waveforms for a gated peak detector of a flowsensor arrangement in accordance with an embodiment of the invention;

FIG. 30 shows a series of waveforms over a time interval illustratingthe expansion of a peak detector's sample time in accordance with anembodiment of the invention;

FIG. 31 shows a flow chart of a program used for gain setting inaccordance with an embodiment of the invention;

FIG. 32 shows a block diagram of a peak detector and sample gate inaccordance with an embodiment of the invention;

FIG. 33 shows a flow chart of a transducer resonance seeking program inprecise mode in accordance with an embodiment of the invention;

FIG. 34 shows a flow chart of a transducer resonance seeking program incourse mode in accordance with an embodiment of the invention;

FIG. 35 shows a transmitter ultrasonic signal pulse train with anintroduced phase inversion in accordance with an embodiment of theinvention;

FIG. 36 shows a receiver ultrasonic signal pulse train in accordancewith an embodiment of the invention corresponding to the phase invertedtransmitter pulse train signal of FIG. 35;

FIG. 37 shows a cathode ray oscilloscope display of received ultrasonicpulse train signals illustrating the superposition of successivelynormal and phase inverted ultrasonic signal pulse trains in accordancewith an embodiment of the invention;

FIG. 38 shows a representation of an example of received normal andphase inverted waveforms used to calculate a diversion point in time fordetermining the time of arrival of an ultrasonic signal in accordancewith an embodiment of the invention;

FIG. 39 shows a flow chart for a control loop routine used to adjust atiming delay in the determination of a signal arrival time in accordancewith an embodiment of the invention;

FIG. 40 shows a flow pipe and flow sensor arrangement for illustrating acalculation of flow and speed of sound in accordance with an embodimentof the invention;

FIG. 41 shows idealised waveforms of a flow sensor system in accordancewith an embodiment of the invention;

FIG. 42 shows waveforms illustrating the calibration of a dual slopeintegrator of an embodiment of the invention;

FIG. 43 shows a circuit block diagram of an alternate configuration tothat of FIG. 9 of a sensing arrangement in accordance with an alternateembodiment of the invention;

FIG. 44 shows a software context diagram of a flow sensor arrangement inaccordance with an alternate embodiment of the invention;

FIG. 45 shows the use of an analog-to-digital (ADC) converter to samplethe received ultrasonic signal in accordance with an alternateembodiment of the invention;

FIG. 46 shows a flow chart of a routine for storing the sampled receivedsignal into memory for later processing in accordance with an alternateembodiment of the invention;

FIG. 47 shows a flow chart of a routine for determining a voltagereference against which to compare the sampled signal in accordance withan alternate embodiment of the invention;

FIG. 48 shows a flow chart of a routine for determining a peak value ofthe received and sampled signal in accordance with an alternateembodiment of the invention;

FIG. 49 is a waveform illustration of a referenced DC level andzero-crossing points of the received and sampled signal in accordancewith an alternate embodiment of the invention;

FIG. 50 is a magnified view of a single sampled peak of the receivedsignal in accordance with an alternate embodiment of the invention;

FIG. 51 illustrates sample points on either side of a zero-crossing ofthe received signal in accordance with an alternate embodiment of theinvention;

FIG. 52 illustrates the location of a peak centre within the receivedand sampled signal in accordance with an alternate embodiment of theinvention.

DETAILED DESCRIPTION

A particle detector system in the form of a smoke detector 10, shown inFIG. 1, comprises a housing 11 attached to a conduit or flow channel 26.The detector 10 has a number of component parts comprising a detectorchamber 14, an aspirator 16, a filter 18, a fluid inlet 20 and a fluidoutlet 22, For purposes of clarity the precise fluid flow path withinthe chamber 14 is not shown in FIG. 1.

Also associated with the smoke detector 10 is a flow sensor 24. In FIG.1 the flow sensor 24 is in fluid communication with the inlet 20 andaspirator 16.

Conduit 26 is connected to a network of pipes 28. Each pipe 28 has anumber of sampling points 29, which may comprise holes. The samplingpoints 29 allow air to be sampled at various places in an area to beprotected, such as a building (not shown). The aspirator 16 draws airinto the sampling points 29 through the pipe network 28, through theinlet 20 and into the housing 11. The air sample then passes into theflow sensor 24. A flow disruptor 21 may be located upstream of the flowsensor 24 to remove the laminar flow characteristics of steady air flowthrough the pipe network. The aspirator 16 in the detector 10 draws thesampled air along the pipes 28, through the inlet 20, flow disruptor 21,flow sensor 24 and into the detector chamber 14, where the particles aredetected. If the level of particles exceeds a predetermined level, thenthe detector 10 may take a number of actions, such as setting off analarm, activating fire suppression systems or other activities. Thedetector 10 is typically in communication with external devices such asa fire panel (not shown). This system may be employed in a number ofbuildings, and a typical system would be a VESDA1™ Laser Plus™ smokedetector system as sold by Vision Fire and Security Pty Ltd, attached toa pipe network.

FIG. 2 illustrates the flow sensor as an offset arrangement comprisingtwo ultrasonic transducers 42, 44 placed on alternate sides of an airflow path and displaced in the direction of flow. In one embodiment, theflow sensor 24 in the form of an ultrasonic flow sensor has two combinedreceiver/transmitters, such as the US80KS-01 as sold by MeasurementSpecialties Inc. Each combined receiver/transmitter is a piezoelectrictransducer connected to a controller 40. Referring to FIG. 4, thecontroller 40 comprises a driver 45 acting as a wave or signal generatorand receiver 46, analog to digital converter 49 and a digitalmicroprocessor 50, which may have connection to a central processorsystem or network facility via a suitable connection such as a serialdata link 51. The controller 40 generates a signal in a first directionby exciting transducer 42 via driver 45, generating an ultrasonicacoustic signal, which is received by transducer 44, then a signal in asecond direction by exciting transducer 44 via driver 45 generating anultrasonic signal which is received by transducer 42. The microprocessor50, in conjunction with the receiver circuitry 46 measures the timetaken for the signals to propagate in each direction.

Although the flow calculated by this method does not account for traveltime of the signal through air, which is not directly in the flow path,for example the dead space directly in front of each transducer andoutside the flow path, this may be corrected for if necessary by aconstant multiplying factor as would be recognised by the person skilledin the art. Notwithstanding such a correction, the following calculationapplies in carrying out a flow determination in accordance with anembodiment of the present invention.

For a propagation time in the first direction of t₁ and a propagationtime in the second direction of t₂, the speed of the air flow past thetransducers may be calculated as:

$s = {\frac{d}{2}\left( {\frac{1}{t_{2}} - \frac{1}{t_{1}}} \right)}$

where s is the speed of the air and of is the distance between thetransducers. It is then a simple matter to determine flow based on acalculation given the cross-sectional area A of the flow path. That is,flow f is

$f = {A\frac{d}{2}\left( {\frac{1}{t_{2}} - \frac{1}{t_{1}}} \right)}$

It is possible to determine the propagation time in each of the twoaforementioned directions by a number of means, an example of such meansbeing the use of a high-speed electronic digital counter which istriggered by the application of the exciting voltage to the transmittingtransducer and halted by the arrival of the received ultrasonic signalat the receiving transducer.

In a further embodiment a digital signal processor may be used to samplethe received signal using an analog to digital converter and to thencalculate the precise arrival time of a signal by detecting acharacteristic feature in the received signal, namely, a waveformcharacteristic or attribute such as, a peak, or combination of peaks ora zero crossing or combination of zero crossings. Advantageously,embodiments of the present invention introduce a predetermined artefactor modification to the transmitted waveform in a manner, which allows amarked differentiation between a received waveform with and without theintroduced artefact, which provides a stable point of reference fordetermining the time of arrival of the received signal. Preferably, theintroduced artefact to the waveform characteristic may be the result ofa phase inversion provided in a cycle of the transmitted signal asdescribed in more detail below.

The introduced waveform modification is introduced at a specified pointin the duration of a reference signal to distinguish it from a normalunmodified signal. Preferably, the point in the signal duration chosenis one that readily allows determination of the signal's arrival at areceiver. If the transmitted signal comprises a pulse waveform then itsduration is given by, the interval between (a) the time, during thefirst transition or cycle, that the pulse amplitude reaches a specifiedfraction (level) of its final amplitude, and (b) the time the pulseamplitude drops, on the last transition, to the same level, as would beunderstood by the person skilled in the art.

The flow sensor 24 is required in order to determine that theair-sampling pipe network 28 is in good order. In a first case, a highflow level indicates that pipe work has become dislodged from the smokedetector system 10 or has been broken whereas in a second case, a lowflow level indicates some form of pipe blockage. In either of theaforementioned cases, it is likely that the performance of the smokedetection system 10 has become impaired so these conditions should bedetected and reported so that corrective measures may be enacted.

Determining the rate of flow through a pipe network 28 is oftendifficult, and many known types of flow sensor require some part of thesensor to protrude into the airflow. The air sampled in a smokedetection system often contains contaminants for example in the form ofparticles and fibres. These contaminants may cause errors in the flowsensing means of related art mechanisms. For example, in resistive typedevices, such as a constant temperature probe, accumulation ofcontaminants on the probe changes its heat transfer characteristics.Other flow sensors such as moving vane types also project into the airstream flowing through the pipe or housing of the detector and are alsosubject to contamination. Smoke detecting systems may be required to besituated in the field for many years without calibration, and thereforereliable flow sensing is important. Further, smoke detectors areordinarily required to operate in a variety of conditions, such as arange of temperatures, humidities and pollution levels. These conditionsmay affect the performance of the flow meter, affecting the overallperformance of the detector.

In other related art mechanisms, a restriction, such as an orifice orventuri, may be interposed within the flow path. A manometer may be usedto measure the pressure drop across this restriction, which indicatesthe level of flow. This approach has the disadvantage that it impedesthe flow of air and therefore reduces the efficiency of the aspiratorcausing excessive air transport time delays or reduced area coverage ofthe sampled smoke detection system overall. Such systems may also besubject to contamination problems as the restriction accumulates dust,fibres and other matter, causing the flow reading to drift from itscorrect value.

Further, most related art mechanisms measure the mass-flow of air, whichis highly sensitive to density variations with temperature and altitude.Thus, such mechanisms require a compensation means for temperature andpressure in accordance with their individual characteristics incurringextra expense and calibration time. The present invention measuresvolumetric flow, which is substantially constant with temperature and isa better measure of pipe work blockage or disconnected pipe work.

In accordance with embodiments described herein, using an ultrasonicflow sensing mechanism within a smoke detection system, at least one ormore of the above described deficiencies may be overcome.

The present invention has been found to result in a number ofadvantages, particularly for sensing air flow in a smoke detectorsystem, such as:

a. Ultrasonic flow sensing reports volumetric air flow (litres perminute or equivalent) and is not dependent of pressure or density;

b. The transducers are placed outside the airflow path so airbornecontaminants are not deposited on the transducers;

c. The system has no moving parts and so is not subject to mechanicalwear;

d. Ultrasonic flow sensing is intrinsically very stable allowing moresensitive detection of flow changes; and

e. A measurement of air flow may be obtained with a high level ofconfidence given the accuracy of determination of the time of flight ofan ultrasonic signal between a transmitting transducer and a receivingtransducer where the time of arrival of the signal at the receivingtransducer is determined in accordance with embodiments describedherein.

One major problem of aspirated smoke detector systems is blocking of airflow, for example, in sample holes 29. It has been very difficult todetect whether one or more sampling holes 29 are blocked. Traditionallythis has been addressed by visually checking the sample holes 29 orregular cleaning, whether required or not. Using an ultrasonic flowsensor 24 it is possible to detect smaller changes in airflow into thedetector. As one or more sample holes 29 become blocked, the airflowinto the detector drops, and the ultrasonic flow sensor 24 detects this.Once the flow of air drops below a predetermined value, the detector mayindicate a fault, allowing a user to check the pipe network 28 andsampling holes 29 for blockage.

In the preferred embodiment of the invention, an ultrasonic flow sensor24 is interposed in the air flow path in order to detect any off-normalair flow condition in the air-sampling pipe network 28 of a smokedetector system 10. In the preferred embodiment, the flow sensor 24comprises at least two transducers mounted on opposite sides of an airflow path and offset by a distance in the direction of flow as shown inFIGS. 2 and 6.

A control unit 40, shown in FIG. 4, comprising a driver stage 45, areceiver amplifier 46, a detector comprising comparator 47 and dualslope integrator 48 and microcontroller 50 is incorporated to initiatethe excitation of a transmitting transducer 42 or 44 and to measure thepropagation time of the ultrasonic signal to the receiving transducer 42or 44.

In the preferred embodiment and with reference to FIG. 5, themicroprocessor 50 is programmed to excite a transducer 42 or 44 withfive pulses whose repetition rate is 80 kHz. The processor 50 is thenrequired to wait for a known blanking time period t_(b) and thenactivate the zero-crossing detector circuit. After a further time,t_(r), which nominally corresponds to the expected occurrence of, forinstance, the third peak of the received signal, the detector circuit isactivated and using a dual-slope integrating ramp circuit 48, determinesthe time position of the centre of one of the peaks in the receivedsignal relative to the end of t_(r). This time t_(w) is represented by avoltage V_(w) that is measured by the analog to digital converter 49 onthe microprocessor 50. This voltage is converted to a time by theformula

t_(w)=kV_(w)

where k is a constant readily calculated from the integrator circuit 48component values.

Therefore the total propagation time, from a known peak P in thetransmission waveform, to the corresponding pulse in the receivedwaveform t_(p) as indicated in FIG. 5, is

t _(p) =t _(b) +t _(r) +t _(w) −t _(d)

where t_(d) is the delay from the start of the waveform to a nominatedpeak P in the waveform.

An aspect of the preferred embodiment is that the propagation timemeasurement uses an early part of the received waveform; usually thethird or fourth peak, to determine the arrival time of the pulse. Thishas the advantage of avoiding phase and amplitude errors caused by thearrival of echoes and higher order propagation modes, which aresensitive to temperature.

A further aspect of the preferred embodiment is the use of a dual slopeintegrator 48 to determine the location of the centre of the sinusoidalwave-peak P used for the receive timing. This aspect averages theleading and trailing zero crossing times of the nominated wave-peak P inorder to estimate its centre time. This aspect allows the precisedetermination of the sinusoidal wave position at very low cost andavoids the need for high-speed counters or high speed sampling andprocessing schemes. This aspect is explained in more detail below withreference to the attached drawings.

The dual slope integrator 48 is a means of estimating the centre timepoint of a waveform event characterised by a rising edge followed by afalling edge or alternatively, a falling edge followed by a rising edge.For the purposes of clarity of explanation and with reference to FIGS. 3a and 3 b, only the case of the rising edge followed by the falling edgewill be discussed.

Referring to FIGS. 3 a and 3 b, initially, both flip-flops A and B arein the reset state causing Q to be active, thus enabling the two equalvalue current sources 30, 31. The integrator 48 is held inactiveinitially by the de-activation of the enable signal so the RAMP outputis zero,

At a time t_(ref), the ENABLE signal is activated and the RAMP outputstarts to rise at a rate, which is proportional to 2 l where l isproportional to a single current source output, either 30 or 31.

After a time t_(f) one of the WAVEFORM peaks asserts a positive edge,thus activating flip-flop A, which in turn disables one current source31 through the control signal CA. This causes the RAMP to slow to a ratehalf of the previous rate.

After a time t_(s), the WAVEFORM peak asserts a negative edge,activating flip-flop B and consequently disabling the other currentsource 30 through control signal CB so that no current is being fed intothe integrator 48. The integrator 48 will thus hold the RAMP value atthat value that was present at the fall of the WAVEFORM edge.

Thus the RAMP voltage now represents an elapsed time value from t_(ref)shown as t_(k) where:

$t_{k} = {t_{f} + \frac{t_{s}}{2}}$

Thus it may be readily seen that the dual slope integrator RAMP finalvalue is proportional to the elapsed time from a reference time to thecentre of the WAVEFORM pulse.

Preferably an airflow disruptor 21 is situated upstream of the flowsensor 24, to assist the flow sensor 24 in providing a more uniformdetermination of flow of fluid (air) within the airstream. The flowsensor 24 may be situated before the air is sampled through thedetection chamber 14, or after. The flow sensor 24 may be situated in anumber of different locations along the flow path of the air to besampled. However, for best results in accurately measuring the totalflow of the air drawn into the network, the preferred location is at ornear the fluid inlet 20. FIG. 1 shows the flow sensor 24 located beforethe aspirator 16, and after a flow disruptor 21. It has been found thatdisrupting the flow provides a better estimate of the flow rate asultrasonic flow detectors appear to average out the flow rate along thepipe if it is not laminar. Laminar flows may be difficult to measureconsistently using an ultrasonic flow meter, as the flow profile maychange.

In accordance with a preferred embodiment of the invention, when used ina smoke detector system 10 as described with reference to FIG. 1, a flowsensor 24 as disclosed herein may provide flow measurement capabilitiescharacterized by:

providing a flow measurement function that measures the absolute volumeflow rate of sample air through the air sample inlet port, namely fluidinlet 20, of the detector 10;

for inlet flow rates in the range 0 to 100 litres per minute, thedetector 10 preferably has a monotonic flow measurement characteristic;

while operating over the normal environmental range, as would befamiliar to the person skilled in the field of aspirated smoke detectorsusing sampling pipe networks, the detector 10 may achieve a maximumairflow rate measurement error of one half of the flow change obtainedwhen any single sample hole 29 is blocked, assuming measurements areaveraged over a period of 180 seconds, and;

the detector may perform its flow measurement function while in aRunning state.

A more detailed description of preferred and alternate embodiments ofthe invention follows.

Relatively high-frequency ultrasonic transducers may be used in order tominimise interference effects from sounds generated within the smokedetector 10 or from external sources. The preferred frequency ofoperation is in the region 60 KHz to 90 KHz.

With reference to FIG. 6, sound pulses are sent through the air in theflow channel 26, first from transducer 42 to transducer 44 and then inthe reverse direction from transducer 44 to transducer 42. The flowaffects the arrival time of the pulses by retarding the first pulse andadvancing the second. Accurate measurements of the transit times may beused with appropriate formulae to yield a measurement of flow.

Preferably, the transducers are positioned such that they are displacedfrom each other by at least 75 mm parallel to the direction of flow asindicated in FIG. 6.

Pulse Timing

In order to obtain the necessary flow resolution, it is preferable toresolve the transit time between sensors to about +/−30 nSec. For a flowchannel 26 diameter of about 11 mm, and a transducer displacementparallel to the flow of 75 mm, this translates to about a 0.5litre/minute flow error. This level of error is expected to besufficient to meet the measurement error requirement of operating smokedetector systems. Due to noise issues it is preferable to average overthe measurement period to achieve the timing required. It would beunderstood by the person skilled in the art that in this designutilising time-of-flight calculations, stability of measurement withtime, temperature and other environmental considerations is much moreimportant than absolute accuracy,

Flow Calibration

The nature of time-of-flight sensing is such that there is no need tocalibrate the sensor or to compensate it for temperature variation.However, there may be steady state offsets in the measurement. This mayrequire zeroing out in accordance with methods that the person skilledin the art would be acquainted with.

Data Output

It is useful to provide measurement readings in accepted standard units,For example, flow in litres per minute or speed of sound in meters persecond. This may ease the task of writing interface software, whichneeds to interpret these values, and for users of the device who need tounderstand them. It is considered acceptable to provide measurements asdecimal multiples of standard units to allow use of integers as theinformation containing data structure.

Example acceptable units are:flow:

litres/min

decilitres per minute (tenths of litres/minute)

speed of sound:

metres per second

centimetres per second

signal amplitude:

volts

millivolts

Software Interface

The following minimum set of commands from may be implemented

1. Calibrate electronics

2. Get Flow

3. Get Speed of Sound

4. Get Amplitude

5. Get Status

Detailed Design

As the software, hardware and mechanicals of a preferred sensor areinter-related and to illustrate a system with both satisfactory andknown characteristics, each aspect of these is now described in detailsufficient for each part to be constructed and for the algorithms to becoded in a manner as would be readily understood by the person skilledin the art.

The person skilled in the art would also appreciate that it is possibleto achieve equivalent design outcomes by using different approaches.However, it should be noted that the examples given herein below aretested and are known to work,

Mechanical Requirements

There are some mechanical requirements, which are important in thedesign of an ultrasonic flow sensor.

Transducer Spacing

The transducers should be spaced so that they are separated along thedirection parallel to the air flow by about 70 to 90 mm. If they arediagonally opposed, the distance measurement should be made along thedirection of flow. The spacing perpendicular to the flow is notconsidered important. Examples of acceptable designs are shown in FIG. 7a and FIG. 7 b. A further example of a transducer spacing arrangement,not shown, is a variant of that which is shown in FIG. 7 b and comprisesa single reflector for two transducers, which are positioned on the sameside of the air flow. In other words, the two reflectors shown in FIG. 7b are replaced with a single reflector. The individual transducers maybe cylindrical in shape and generate a cylindrical field pattern. Inorder to control the directionality and to improve the system gain, itis advisable to focus the ultrasonic energy. The preferred constructionin this instance is to place the transducer in a horn reflector as shownin FIG. 8.

Air Path

Within the field of aspirated smoke detectors, the design of the airflow path may be considered to be constrained in two ways.

1. Firstly, it is preferable that the cross-sectional area of the airpath be similar to the cross-sectional area of a standard sampling pipe(for example, a VESDA™ system with an air path cross-sectional area ofabout 350 mm2). This characteristic minimises flow impedance whilemaintaining reasonable flow velocities. If the flow section is toonarrow, then the flow impedance may increase. If the flow area is toowide, the lower air flow through that section may decrease reducing theaccuracy of the flow measurement.

2. The flow should preferably be turbulent. The section leading up tothe flow section may therefore have some degree of step or discontinuityto ensure that laminar flow is not supported.

Proximity to Noise Sources

Although it has been found that the ultrasonic flow meter may beresistant to interference from external noise sources, it is recommendedthat the spacing from any transducer to the aspirator be no less than 50mm.

Description of the Electronics

With reference to FIG. 9 generally, and FIGS. 10 to 42, morespecifically, the details of the electronic circuitry and its operationsrequired to provide the functionality comprising the ultrasonic flowsensor is described below.

Transducers 42, 44

The transducers for use in the flow sensor design may be the US80KS-01manufactured by Measurement Specialties Inc. The most important featureof these transducers is their relatively low

Q compared with other low-cost transducers. This attribute assists theaccurate determination of the timing of the received ultrasonic pulses.Accordingly, transducers with a Q of less than about 10 may be used.

Microprocessor 50 and Fuse Settings

The microprocessor 50 used in the preferred embodiment is an AtmelATMega8. This device has 8K of ROM and 1K of RAM. It also has amultiplexed 10-bit ADC and hardware timers. The following fuse settingsshould be enabled to ensure correct operation.

Preserve EEPROM contents when programming

Brown out detection

High Speed Crystal

Transducer Drivers 45

With reference to FIG. 10, the ultrasonic transducers 42, 44 are drivenby a differential 80 KHz (nominally) square wave. The drivers, 45 a, 45b, 45 c, 45 d each provide a 15 Vpp swing and are able to be switchedinto a high-impedance state. The drivers are controlled by themicroprocessor 50 to put out 5 pulses as shown in FIG. 11. Following thepulses, the negative side driver 45 b or 45 d is held low and thepositive side driver 45 a or 45 c is switched to high impedance.

Receive Selector

With reference to FIG. 12, once the pulses have been generated thereceive circuitry 120 is enabled. The receive circuit 120 selects(listens to) the receiving transducer 42 or 44 and deselects the sendingtransducer being the other of 44 or 42. Schematically, the receiveselector 120 functions as follows. When it is required to receive thesignal A from a transducer, the series switches SE are closed and theshunt switches SH are opened on that circuit branch. The signal B fromthe other transducer is not wanted and so is attenuated. This isachieved by opening the series switches for signal B and closing theshunt switches. The configuration shown is preferred as it has beenfound to achieve good attenuation and isolation.

When it is required to listen to signal B from the alternate transducer,the states of all of the switches of the receiver selector 120 may beinverted with respect to the arrangement of FIG. 12, as shown in FIG.13.

Receiver Amplifier

Referring to FIG. 14 a receiver amplifier 140 is shown and has a numberof notable characteristics, namely:

1. Very high input impedance, >5 MOhms at the active frequency range (50Khz to 150 KHz)

2. High gain adjustable from about 500 to 5000

3. Bandpass frequency characteristic with corner frequencies at 48 KHzand 150 KHz approximating a Butterworth characteristic with 60 dB/decaderoll off at lower frequencies and 40 dB/decade at high frequencies.

The preferred implementation in this case is a multistage amplifiercomprising a JFET front end 141 followed by three operational amplifiergain/filter stages 142, 143, and 144. The final stage 144 has adigitally adjustable gain setting element, which may control the gainwithin the range 1 to 10.

Peak Detector

In order to adjust the receiver 46 gain and to perform coarse receiverposition detection, it is necessary to measure the peak value of thereceived signal at selectable times. A gated peak detector 47 b isprovided for this purpose. Its behaviour is illustrated in FIG. 15.

A suitable implementation for the peak detector 47 b may be an analogswitch 161 followed by a diode 162 and a resistor-capacitor 163, 164network as shown in FIG. 16.

When the sample gate 161 is enabled, the output follows the peak of theinput waveform of FIG. 15. When the gate 161 is disabled, the lastsampled value decays slowly toward 0 volts. The decay time constant isabout 3 mSec and the peak sampling time constant is preferably about 1uSec.

As the peak measurements are all relative to an initial sampled value,the absolute value is not considered important. The specifications forthe peak detector are:

Parameter Value Tolerance Sampling time constant 1 uSec +/−50% Decaytime constant 3 mSec +/−50% Maximum output voltage 4.4 V +/−10% Minimumoutput voltage 0 V +5/−0%

Averager

An averaging circuit 47 is provided, as shown in FIG. 17 to set thereference level for a zero-crossing detection circuit, a description ofwhich follows. The averaging circuit 47 a is enabled for a sample periodprior to the arrival of the received ultrasonic pulse train, The circuitaverages out signal noise at this time and samples the background signalDC level. When the averaging circuit sample gate 171 is disabled, thecircuit retains this average background value as a reference to feedinto the zero crossing detector. The preferred specifications for theaverager 47 a are:

Parameter Value Tolerance Rise time 200 uSec +/−10% Damping factor 0.7+/−10% Decay Time Constant 0.05 sec Minimum Maximum output voltage Vcc+0/−5% Minimum output voltage 0 V +5/−0%

The averager may be implemented as low pass filter 172. Referring toFIG. 18, the low-pass filter 172 is preferably an active filter with aparallel capacitive component at the input, which is required to holdthe stored average value when the gate 171 is disabled.

Zero-Crossing Detection Circuit 47 c

Referring to FIG. 19 a zero-crossing detection circuit 47 c is includedto provide an output indicating the presence and polarity of zerocrossings in the received signal. This functionality may be providedwith a simple, high-speed voltage comparator 191. The comparator 191output is high when the receiver signal is higher than the average leveland low when the receiver signal is lower than the average level. Eachpulse edge corresponds to a zero crossing transition of the receivedsignal. The preferred specifications for the zero-crossing detectioncircuit 47 c are:

Parameter Value Tolerance Output rise time 100 nSec Max Propagationdelay 50 nSec Max Output voltage range HCMOS compatible Input voltagerange 0 to 5 V Nominal Input hysteresis 10 mV Minimum

Pulse Position Detector Circuit

The pulses from the zero-crossing detector circuit 47 c correspond topeaks in the received signal. In order to accurately determine thetransit time of the pulse from transmission to reception, it isnecessary to accurately locate a signal artefact such as a peak or aseries of zero crossings etc. It is noted that a single zero crossingmay not be acceptable as a timing feature because its position jitterswith small changes in offset. Similarly a threshold arrangement may beconsidered unacceptable as its position depends on signal amplitude.

It is possible to estimate the position of a peak by measuring the timesof the zero crossings on either side of it and averaging them. This is arobust approach to peak location as offsets in the signal due tolow-frequency interference or noise are cancelled out.

A circuit suited to the task of locating the zero crossings andaveraging them is the Dual Slope Integrator 48. FIG. 20 shows apreferred circuit structure of the dual slope integrator 48.

Referring to FIG. 21 in more detail, there are four modes of operationof the dual slope integrator or ramp circuit 48. They are Clear, Runfull-rate, Run half-rate and Stop. The switch positions for each ofthese states is shown in FIG. 21. The states may be controlled by twoflip-flops and two inverters. The overall circuit is shown in FIG. 22.Sample waveforms for the ramp circuit 48 are shown in FIG. 23 andcorrespond in more detail to those shown in FIG. 3 b. At a predeterminedtime, the system microcontroller 50 enables the RUN signal. RUN isindicated in FIGS. 20, 21 and its waveform is shown in FIG. 23. Theenabling of the RUN signal opens the switch 201 across the integratingcapacitor C allowing it to charge up at a particular rate, R. At theoccurrence of the next positive edge of the zero crossing waveform, theENABLE 1 signal turns off, dropping the charge rate to R/2. The fallingedge of the zero crossing signal turns off the ENABLE 2 signal causingthe integrator to stop charging and to hold its value. This value may beread by the ADC of the microcontroller 50. Once the value has been read,the microcontroller 50 drops the RUN signal, clearing the integrator 48and resetting the flip-flops, FF1 and FF2 of FIG. 22, to their initialstate. Thus, this circuit locates the position of the peak in question,relative to the RUN edge, by averaging the times of the +ve and −ve zerocrossings of the received signal. The value of the integrator output isdirectly proportional to time from the rising edge of the RUN signal tothe centre of the peak that follows that edge. The preferredspecifications for the ramp circuit 48 to detect pulse position are:

Parameter Value Tolerance Input Logic Levels HCMOS Compatible Fast RampSlew Rate 0.26 V/uSec +/−20% Slow Ramp Slew Rate 0.13 V/uSec +/−20%

Software Implementation

The method of operating the ramp circuit 48 is described below withrespect to an exemplary software implementation of an improved smokedetector system 10. The following describes the detail of how to performfundamental operations required of the software. A Software ContextDiagram relating to the operation of a preferred embodiment of theinvention is illustrated in FIG. 24.

Software Method Requirements

There are a number of functions which the software performs in order tooperate the flow sensor reliably, as follows:

1. Adjust gain

2. Determine transducers' resonance frequency

3. Search for received pulses

4. Track changes in the wavefront position

5. Calibrate electronics to account for component variations

6. Store and retrieve parameters in non-volatile storage

7. Communicate with a host

8. Accurately time the arrival of the received signal in each of twodirections

Software Structure

The software developed for the Flow Sensor has the followingadvantageous features:

1. There is no operating system or background task handler.

2. All individual functions are slaved to external events.

3. The only interrupts used are for communications with the host system.

4. All interrupts are disabled during critical timing measurements.

Overall Operation

The overall operation of the flow sensor 24 is described by theflowchart of FIG. 25.

In the flow chart of FIG. 25, the program starts by determining theresonance from transducer A to transducer B at step 251. That is, theobserved resonance when transmitting from transducer A and receivingwith transducer B. This resonance determination step is required in thisembodiment as other routines do not work correctly unless thetransducers are driven at their resonant frequency.

The next step, FindLeadUp 252, is to determine the approximate timetaken for the transit of a pulse from A to B. This arrival time may bedetermined to within one quarter of a cycle of the transmittingwaveform. This step finds the time of flight by determining the locationof the aforementioned point of diversion. Other routines may refine thisestimate in order to get an accurate measure of the transit time.

At steps 253 and 254 Resonate and FindLeadUp are then calledrespectively for the reverse direction, i.e. transmitting fromtransducer B and receiving at transducer A. At this point the flowsensor 24 is ready to process a command from the host and waits for acommand at step 256. A preferred set of commands with reference to FIG.25 are:

Command Description Comment GET_FLOW Start a flow measurement andReturns Flow in 100 x l/m and Steps 257, 258 and return the result Speedof Sound in 10 x m/sec 259 SET_ZERO_CAL Calibrates the Electronics, flowThis should be done at between 20 C. Steps 260 and 261 zero value andsaves the and 30 C. measured speed of sound GET_AMPLITUDE Requests lastmeasured signal Returns amplitude 512 (approx min) Step 262 amplitudeand amplifier gain to 1023 (max) and gain setting 1 to setting 100IS_CALIBRATED Request calibration status Returns a status flagindicating Step 263 whether or not the sensor has been calibrated usingthe SET_ZERO_CAL command. GET_VERSION Requests firmware version Step 264number

If a GET_FLOW command is received while in wait at step 256, the programfirst calculates flow and speed of sound using the routineCalcFlowAndSound( ) at branch steps 257, 258 and 259. This routinemeasures the transit time of the ultrasound pulse in each direction(from A to B and from B to A) while at the same time, tracking theposition of the wave to ensure that it doesn't move out of range. Theresultant flow measurement and speed-of-sound measurements are availableto send to the host. The program may check to see if the speed of soundhas changed significantly from the value calculated in the precedingcall, steps 257 and 258. If there has been a significant change in thespeed of sound then the Resonate( ) routine is called at step 258 tomaintain system tuning.

If a “calibrate electronics” command is received while in wait step 256,the unit performs a routine to calibrate the receiver electronicsagainst component variation at branch steps 260 and 261. This is NOT aflow calibration but simply an internal self calibration. Preferably,this operation should be done under zero-flow conditions; and the inletpipe 26 should be blocked. This routine also records the measured speedof sound as a reference, step 261.

If the received command while in wait step 256 is to retrieve amplitude,then the amplitude of the received ultrasonic pulse and the gain settingof the receive amplifier are sent to the host at step 262. This commandis a good “health” indicator of the detector as a low amplitude readingis indicative of either strong contamination or device failure.

Sending Pulses

In order to measure flow, the microcontroller 50 is required to firstsend a sequence of ultrasonic pulses, ordinarily in the form of a pulsetrain. Other waveforms, such as a burst of sine or triangular waves arealso acceptable. In the preferred implementation, the controller sends 5pulses with a period of 12.5 uSec and 50% duty cycle as illustrated inFIG. 26.

Wait Routines

The wait routines in the preferred implementation are based on hardwaretimers. Software optimisation is set for maximum speed so that theoverhead associated with timing activities is minimised.

Burst Pattern Description

When the transducers 42, 44 are driven, one transducer (the active one)is driven by an antiphase drive signal, producing maximum acousticoutput. The non-driven transducer is driven by an in-phase drive signalso that the potential difference across it is zero and it therefore itproduces no output. The transducer arrangement and the correspondingresultant waveforms are shown by example in FIG. 27 a and FIG. 27 b,respectively. It can be seen by inspection of the example of FIG. 27 bshowing a “sending from A,” that when it is desired to send fromtransducer A, the drive signals to it, viz. burst1 and burst2, areanti-phase. This is in contrast with the drive signals to transducer B,also shown in the example of FIG. 27 b. In the second example, ‘sendingfrom B’ the reverse condition exists. In this instance, burst2 is now inphase with burst1 and, burst3 is antiphase with respect to burst1. Sincethe waveforms are generated by setting bits on an output port, thefollowing patterns may be cycled to produce the conditions noted above.

Sending from Transducer A

1^(st) half cycle 2^(nd) half cycle burst2 1 0 burst1 0 1 burst3 0 1Sending from Transducer B

1^(st) half cycle 2^(nd) half cycle burst2 0 1 burst1 0 1 burst3 1 0

Sampling the Received Waveform

A number of routines require the sampling of the received waveform atvarious time points. Routines such as AutoGain( ), step 262 of FIG. 25,and FindLeadUp( ) steps 252 and 254 of FIG. 25, are examples. The ADC onthe Atmel ATMega8 (microprocessor 50) has a sample-and-hold circuit witha short, fixed sample time. This is therefore modified to provide aseparate sample-and-hold which has a sample gate controlled by themicroprocessor 50 allowing the software to sample over long or shortperiods as required. When used with long sampling times, the circuitacts as a peak detector, following the “highs” of the received signal asshown in FIG. 28. This peak-detector mode is useful in the AutoGainroutine of step 262 in FIG. 25, in order to establish the peak amplitudeof the received signal. Other routines require sampling of the waveformfor short periods of time. The FindLeadUp( ) (steps 252 and 254, FIG.25) routine samples the waveform for 2 microseconds at successive timepoints in order to measure the instantaneous voltage at that time. Thiscannot be done with just one burst as the microprocessor ADC is tooslow. Since the signal is repetitive, sampling and holding the signal ata particular time after a burst allows the microprocessor 50 to recordthe reading at the sample time. Sliding the sample window allows themicroprocessor 50 to scan over the received signal and plot out theenvelope over successive bursts, as shown in FIG. 29. So with a samplegate time of about 1 to 2 microseconds, it is possible to get areasonable indication of the peak value during that time. It can be seenthat by iteratively expanding the sampling gate, the final value of thepeak detect circuit 47 b may be made to follow the peak value of theunderlying waveform and hold that value when the gate, 161 of FIG. 16,is disabled, as shown in the successive waveform diagrams of FIG. 30.

Set Gain—AutoGain( )

This routine is designed to set the gain of the receive circuit, eitherthrough transducer 42 or 44, so that the received signal amplitude isabout 70% of full scale. The reason that it is undesirable to have moreamplitude than this is that out-of-band signals may cause saturation ofthe receive circuit resulting in loss of timing information. Thecorresponding program flow of the Gain setting routine 310 isillustrated in the flowchart of FIG. 31. A minimum gain is set at step311. Pulses are sent by the transmitter at step 312. The softwaresamples the peak signal over the time interval of 410 uSec to 480 uSecat steps 313 and 314 of FIG. 31. This sampling is regardless oftemperature and air flow. Signals are measured using a sample gate 321which connects the receiver 46 output to a peak detector circuit 47 b asshown in FIG. 32.

The peak detector circuit 47 b tracks the peak amplitude of the signalwhen the sample gate 321 is enabled. The peak detector 47 b holds thesampled value when the sample gate 321 is disabled, allowing time forthe microprocessor ADC to measure the value.

At step 315 of FIG. 31, if the measured amplitude is less than therequired set point, the gain is incremented at step 316.

With regard to numerical values determined at steps 317 and 318, thepeak detector 47 b may, at most, produce a voltage of 5-0.6=4.4V. Thistranslates to an A/D output value of about 900 counts. The minimumpossible amplitude is the zero-signal quiescent voltage of the lastamplifier which is about 2.5V-0.6V or about 1.9V. This is equivalent toan A/D count of about 390. The maximum number of iterations is 100 (theadjusting potentiometer “wiper” has either 32 positions or 100 positionsdepending on which type is fitted to the circuit board).

Note that an alternate embodiment of this aspect of the invention is theuse of variable duty cycle of the transmitted waveform to affect gainchange. Maximum energy is imparted to the transducers when they aredriven with a waveform with a 50% duty cycle. Gain reduction may beachieved if required by manipulating the duty cycle of the transmitterwaveform.

Finding Transducer Resonance

The resonant frequency of the transducers 42, 44 may vary considerablyfrom about 60 KHz to 92 Khz depending on the batch and temperature ofoperation. It is important to drive the transducers at their resonantfrequency for two reasons.

1. Maximum signal coupling is obtained at resonance

2. Signal phase shift is 0 degrees at resonance, which is important fortiming considerations.

The resonance is found by changing the drive frequency to thetransducers 42, 44 and measuring the amplitude of the received signal.The frequency which achieves the highest amplitude is the resonantfrequency. The resonance seeking routine Resonate( ) 330, 340 may run ina precise mode (mode=0) designated as routine 330 as shown in FIG. 33and coarse mode (mode=1) designated as routine 340 as shown in FIG. 34.In precise mode as shown in FIG. 33, the AutoGain routine is run at step310. At step 332 the gain is trimmed by a course sweep performed overfrequencies and the gain is adjusted down if the amplifier 140 nearssaturation. A fast frequency sweep is performed at step 333 and thefrequency Fc at which the largest received signal is obtained is stored.At step 334 a more precise search is performed where the drive frequencyis varied around Fc in small increments and a determination is made ofthe frequency F_(p) corresponding to the largest received signal. Incourse mode as shown in FIG. 34, the AutoGain routine is again run atstep 310. However, the trim gain step 332 of the precise mode routine330 is omitted by routine 340. Thereafter the course mode routinefollows the same steps as the precise mode at steps 342 and 343.

Gain Iteration While Finding Resonance

In the course of finding the transducers' resonance, the first thing thefirmware does is to select a default drive frequency and then adjust thesystem gain to get an acceptable received amplitude. If the transducers'resonant frequency is well away from this initial drive frequency thenas the firmware searches for resonance, the receive circuit is likely tosaturate because the coupling efficiency will improve dramatically asresonance is approached. Saturation of the received signal means that itis not possible to discriminate the resonant peak. The firmwareovercomes this problem by adjusting the gain up and down as required inan iterative fashion while sweeping the drive frequency to ensure thatresonance is found without causing amplifier saturation. Once theoptimum gain has been set, a fine frequency adjustment is undertaken toaccurately determine the resonance frequency.

Finding Received Pulse Train—FindLeadUp( )

A routine is required to locate the arriving pulse train waveform. Asimple threshold method is not desirable as this may be susceptible tobeing unstable or unreliable, for example, it may tend to be affected byminor changes in amplitude. The following description identifies theapproach taken by the present invention according to a preferredembodiment.

Locating the Measurement Peak

The ultrasonic flow sensor 24 relies on being able to accurately measurethe time of arrival of a particular target peak or other characteristicwave feature in the received signal. The attributes of the target peak,for example, are that it has sufficient amplitude to provide a goodsignal-to-noise ratio and that it is not so far into the received pulsetrain that it can be adversely effected by echoes. For example, onecould nominate the fourth or fifth peak for this purpose, The task then,is to reliably locate this peak over a wide range of flows, temperaturesand transducer resonances, This is a non-trivial task. For example,threshold methods and envelope curve-fitting methods are not consideredto work reliably over temperature and flow variations. The method usedin the preferred embodiment described here employs the transmission of areference signal and a signal which has an artefact introduced into itat a known position in the signal. By comparing the two signals, theposition of the artefact may be easily determined. One such artefact isa phase inversion. A phase-inversion signal differs from the normalpulse train in that it has a 180° degree phase shift (i.e. a signalinversion), which may be introduced part way through the pulse train.FIG. 35 illustrates an example of drive waveforms for a firsttransmitted signal comprising a first normal pulse train and a secondtransmitted signal comprising a pulse train having the fourth peak witha phase inversion of 180 degrees which is the artefact to be located.FIG. 36 illustrates representations of received waveforms correspondingto the waveforms of FIG. 35. The received signal waveforms differ inshape due to the two different excitations illustrated in FIG. 35. Bysuccessively sending normal and phase-inverted signals, it is possibleto determine where the artefact occurred, thus identifying a consistentposition or marker in the received wave. An actual sample of receivedsignals is shown in FIG. 37. With reference to FIG. 37, it can be seenthat there is a marked difference between the two waveforms at peak B.This point is called the diversion point. This is a consistent featureover temperature and flow, provided that the transducers are driven attheir resonant frequencies.

Locating the Diversion Point in software.

It is easy to spot the Diversion Point visually. It is also a simplematter to write an algorithm to locate it. With the aid of the receivedwaveform representations of FIG. 38, the algorithm takes the form:

1. Alternately send normal and phase-inverted signals.

2. Scan in time through the received signals.

3. For each peak point P in the normal signal calculate the difference Ybetween the normal waveform value and the phase-inverted waveform value.

4. If this difference is greater that the phase-inverted value X at thatpeak point then the diversion point has been found.

The diversion point may be used as the basis for time of flightmeasurement however it is sometimes desirable to use another location inthe waveform. For example, it may be desirable to use the peak after thediversion point. Once the diversion point has been located, the desiredtiming peak may be found by adding or subtracting a delay time to thetime of the diversion point.

Choosing a Peak

In order to accurately determine the transit time of a pulse train, itis necessary to measure the time of occurrence of a known peak in thereceived signal. For example, it may be required to measure the third orfourth peak after the onset of the received signal. The choice of thepeak is a compromise between two conflicting requirements:

1. maximising signal to noise ratio;

2. excluding the effects of higher order modes (basically echoes) whichinterfere with the received signal.

In order to maximise signal to noise ratio, the chosen peak should be atthe point of maximum amplitude. In order to minimise echo effects, thepeak chosen should be close to the start of the onset of the receivedpulse train. In accordance with the preferred embodiment, a goodcompromise has been to use the fourth peak. This peak appears toconsistently have good amplitude while not suffering interferenceeffects.

Homing in on the Desired Peak—ControlLoop( )

Once the lead up to the received waveform has been determined and it isdesired to home into the exact position of the fourth peak, a functionis called to adjust the timing delay so that the integrator outputbecomes 50% of it's range. The routine which serves this purpose isControlLoop( ) designated as 390 in FIG. 39. The routine is given anapproximate time of the peak to be tracked (to within ½ a cycle). Itlaunches a pulse train from one transducer and listens at the other.After the prescribed time (approximate time), it enables the integrator(get ramp at step 391) and reads the result which indicates the locationof the peak. At step 392, if the integrator value is greater than itsmid point, the routine increases the delay at step 394 and re-launches apulse train. At step 393, if the integrator output is less than 50% itdecreases the delay at step 395 and re-launches the pulse train. In thismanner, the integrator is made to step towards it 50% mark at whichpoint the routine completes and the resultant delay time is returned tothe calling routine.

Calculate Flow and Speed of Sound—CalcFlowAndSound( )

The flow and speed of the ultrasonic signal are determined by measuringforward and reverse transit times using straightforward time-of -flightcalculations. A simplified explanation of the method of operation is asfollows with reference to FIG. 40. A pulse is sent in two directions.First from sensor A 42, to sensor B 44, and then in the reversedirection, from sensor B to sensor A. Any air flow in the pipe affectsthe pulse transit time t, the time between launch and reception. In thecase where the sound is launched in the direction of the flow, forexample, the time of flight is given by:

$t = \frac{d}{v + s}$

where t is the transit time, d is the distance between the transmitterand receiver, v is the speed of sound in air and s is the speed of theair between the receiver and transmitter. So, in the case of sensor Atransmitting and sensor B receiving,

$t_{1} = \frac{d}{v - s}$

In the reverse case, where sensor B is transmitting and sensor A isreceiving, the time of flight is given by:

$t_{2} = \frac{d}{v + s}$

Manipulating the above two equations, leads to

$v = {\frac{d}{2}\left( {\frac{1}{t_{2}} - \frac{1}{t_{1}}} \right)}$and $s = {\frac{d}{2}\left( {\frac{1}{t_{2}} - \frac{1}{t}} \right)}$

The volumetric flow f is then simply the speed of the air, s, multipliedby the cross-sectional area A of the pipe. Note that temperature effectsare cancelled out in the air speed result. Although the transit timesare a function of the speed of sound and therefore are an indirectfunction of temperature, the equation for s does not require the actualtemperature, as long as it is possible to accurately measure the transittimes.

Tracking the Wave

The position of the measured wave peak changes with temperature andflow. A flow calculation routine, CalcFlowAndSound( ) comprisingcalculations as noted above for determining the flow may alsoincorporate a simple tracking algorithm to lock to a moving peak. Thealgorithm is very similar to the routine used for ControlLoop( ) asdescribed above in relation to homing in on the desired signal, Theerror bounds may be slightly relaxed to avoid unnecessary hunting of thewaveform peak.

Reporting Transit Times

The flow calculation requires the measurement of the forward andbackward transit times of the ultrasonic pulses. The transit time in aflow sensor arrangement of the preferred embodiment is of the order of350 uSec. In this particular hardware implementation, the transit timemeasurement in a given direction consists of two parts which must becombined to give the total transit time for that direction. The twoparts are:

1. the elapsed time as set by a hardware timer, and

2. a ramp voltage which is proportional to the additional time from theend of that loop count to the occurrence of the centre of a peak in thereceived ultrasound.

The waveforms of the flow sensor arrangement corresponding to the abovetwo parts are illustrated in FIG. 41.

Accurately Modelling the Transit Time

As mentioned above, the transit time is measured by the combination oftwo physical effects. The time elapsed while a hardware timer routineexecutes and a voltage which is proportional to the additional time fromthe end of the timer to the middle of a selected peak in the receivedwaveform.

It is important to work in consistent units so we shall measure thetransit time in seconds. The transit time equation should therefore bewritten as follows:

t=k1countervalue+c+k2*(rampout−k3)

where

t is the transit time in seconds

c is the overhead associated with the timer set up (i.e. the time takeneven if timer count were 0)

k1 is the proportionality constant for timer count value (i.e. how manynanoseconds per timer click)

k2 is the proportionality constant for the rampout voltage (i.e. howmany nanoseconds it takes for a one volt ramp output change).

k3 is a constant reflecting the fixed offset in the ramp voltage (i.e.the output voltage before ramping begins).

Timer Constants

Timer Constant k1

The timer constants are relatively simply determined and do not varyfrom unit to unit as long as the same crystal and microprocessor areused. k1 may be determined by inspection taking into account crystalclock frequency and the timer's prescaler value. In the case of thepreferred embodiment, the crystal is 16 MHz and the prescaler is 8. Theresulting input to the counter is therefore 2 MHz or 500 nSec per tick.This is the k1 value.

Timer Constant c

In practice, the value of c is small enough to be ignored, However, ifrequired, the value of c may be found by experiment. The value of c isthe difference between the calculated delay, corresponding to the numberof counter ticks, and actual measured delay. This value remainsunchanged between units as long as the crystal frequency, microprocessortype and compiler build remains the same. In other words, it isadvisable to use the same compiler with the same optimisation options.

Calibrate Ramp

This routine calibrates the relationship between the integrator outputand timer counts. In other words, it answers the question, “Where thezero crossing time is fixed, how many volts change in the integrator foreach additional delay count?”

With reference to FIG. 42, for a fixed arrival time of the receivedsignal, the output of the ramp circuit changes as the delay is changedfrom delay1 to delay2. The relationship is therefore

${k\; 2} = {\frac{v}{c} = \frac{{v\; 2} - {v\; 1}}{{c\; 2} - {c\; 1}}}$

where v1 is the ramp voltage output at delay1, v2 is the ramp voltageoutput at delay2, c1 is the software count at delay1 and c2 is thesoftware count at delay2,

Error Sources, Timing,

It should be noted that absolute flow reading errors or even minorlinearity errors are not considered important for the intendedapplication of the flow meter in the preferred embodiment. It is onlyimportant that it behave consistently over temperature in order to bestable enough to detect flow changes due to blocked holes in a smokedetector pipe system.

Error in the calculated timing will lead to non-linear flow values.Errors in k1, k2 and k3 will contribute to systematic errors, It isdesired that the timing be repeatable to about 30 nSec. Systematicerrors larger than this that affect the repeatability of a measurementwill cause problems.

Counters

The counters are crystal locked and in this context may be considered tobe absolutely accurate. k1, the counter constant, may be determined byinspection and may be considered error free.

Ramp Constants

k2 and k3 are used to map ramp voltages to times. It may be shown bysimulation that the flow result is not greatly affected by errors inthese values as they do not change between timing measurements.Typically, a 10% error in the ramp constant will result in a 0.5% errorin the flow reading.

In reality, the calibration process will calibrate the ramp constant towithin 1%-2%, causing a flow error at 100 l/m of up to less than 0.2%.

Required ADC Resolution

The analog-to-digital converter in the microcontroller 50 must, afteraveraging, be able to resolve sufficiently to discriminate timingchanges as small as 30 nSec.

Ramp rate 1 is about 0.28 V/uSec

Ramp rate 2 is about 0.14 V/uSec

If the ramp runs for about 14 uSec, for a peak width of about 6 uSec,the average ramp rate will be about (0.28*(14−6)+0.14*6)114=0.22 V/uSec.

A 30 nSec time resolution implies a volt resolution of about 0.22*0.03or about 6 mV. For a 5V reference source, this implies a 10 bit ADC.

In reality, there is sufficient noise in the measurements thatsignificant averaging of repeated measurements is required in order toapproach the desired resolution. It may be possible to use a lowerresolution converter but the 10 bit variety is readily available at nogreat cost penalty for the circuit's operation.

Echoes

Echoes may dramatically alter the perceived arrival time of the pulse.They may interfere with the main pulse and cause artificial phaseeffects.

Echoes are avoided by:

1. Only using the first 5 cycles of the received waveform for timingmeasurements

2 Allowing a suitable time period (2 mSec) for internal echoes to dieaway before launching the next ultrasonic pulse train.

Alternate Embodiment

The following description provides an alternative approach toimplementing the receiver circuit and encoding algorithms for use in anembodiment of the Ultrasonic Flow Sensor of the present invention. Theabove described implementation relies on an analog zero-crossingcomparator and timing integrator to accurately determine the transittime of the ultrasonic pulse. In this alternate implementation, thereceived waveform is directly digitised using a fast analog-to-digitalconverter and the resulting data processed to determine the transittime.

Description of the Electronics

In this alternate implementation the electronics is somewhat simplerthat in the above described analog implementation. The two systems maybe contrasted by a comparison between the circuit block diagrams of FIG.9 and FIG. 43. FIG. 43 shows the alternate configuration using ananalog-to-digital converter to replace the timing electronics.

Software Implementation

The sampling and analysis process that the software is required toperform using an analog-to-digital front end is described below. Forpurposes of illustration, a Software Context Diagram is shown in FIG.44.

Software Method Requirements

As with the above described analog implementation of the preferredembodiment, the software is required to provide the following functions.

1. Adjust gain

2; Determine transducers' resonance frequency

3. Search for received pulses

4, Track changes in the wavefront position

5. Calibrate electronics to account for component variations

6. Store and retrieve parameters in non-volatile storage

7. Communicate with a host

8. Accurately time the arrival of the received signal in each of twodirections

Digital Sampling

In order to perform the above itemised functions using theanalog-to-digital front end, it is necessary to sample the receivedsignal. This process is visualised diagrammatically in the waveformrepresentations of FIG. 45.

The fundamental measurements required to implement the flow sensoralgorithms are as follows:

1. Measurement of signal DC level prior to waveform arrival.

2. Peak amplitude of the waveform in the area of interest (eg, first 10cycles)

3. Recording of first and second characteristic signals in order todetermine the point of diversion

4. Calculation of zero-crossing points on each side of the peak ofinterest.

Storing the Waveform

Although it is possible to perform all of the required calculations asthe received signal data are sampled, it is generally considered easierto sample the waveform into memory and examine the data thereafter. Therequired processing power is less if this is done, and therefore likelyto be a lower-cost solution, but either approach is acceptable.Nonetheless, it is noted that real time evaluation of all of theroutines mentioned is possible but requires the use of a powerful DSP orequivalent gate array. In order to target reduced cost of good, thepreferred implementation required the waveform be sampled into memory.FIG. 46 shows a flow chart of a routine for designated as Store Waveform460, Pulses are sent at step 461 and an appropriate wait time isexecuted at step 462. A memory index is set to its start value at step463. Sampled values of the received waveform are stored at step 464. Thememory index is incremented for each stored sample at step 466 until 200samples are stored, step 465. It is considered sufficient to store 200samples as this is equivalent to about 16 cycles of the 80 kHzultrasonic signal.

Base Function Routines to Replace Electronics in Analog Implementation

The analogue electronics in the preferred embodiment of the flow sensorsystem provided the following functions:

1. DC level

2. Peak value detection

3. Zero crossing detection

4. Peak centre location

The software routines implemented to perform these functions are nowdescribed.

Measurement of the DC Level

In order to determine the positions of the zero crossings on each sideof a peak, it is necessary to establish a voltage reference againstwhich to compare the sampled waveform. FIG. 47 shows a routinedesignated as DC Level 470 for performing this function. This routineexamines the stored, received signal prior to the onset of the firstpeak to establish the idle or DC level against which the rest of thewaveform is to be compared. At step 471 an index is set to a backgroundlevel prior to the first peak of the received waveform and a sampleaccumulator is cleared (initialised) at step 472. Sample values areaccumulated until a maximum of 10 samples are accumulated at steps 473,474 and 476. A DC level is determined at step 475 by averaging theaccumulated samples.

Peak Value

A routine, designated as Peak Value 480 in FIG. 48, determines the peakvalue of the received signal over a region of interest. This routine isuseful in optimising the receiver gain. At step 281 a memory index isset to a start value and a max value corresponding to a peak value isinitialised. The loop at steps 482, 483 and 484 increments the indexeach time a sampled value exceeds the value of max. Step 485 restrictsthe routine to processing 200 samples and the peak value is returned inthe variable max.

Zero-Crossing Detection

A zero crossing is defined to occur where the signal makes a transitionfrom below the above determined DC level to above it or from above theDC level to below. The DC level and the zero crossing points of thereceived signal are shown in FIG. 49. FIG. 50 is a magnified view of onesampled peak in the received signal. It can be seen that a zero crossingmay be identified by a transition of the waveform from below the DClevel to above it, or from above the DC level to below. The preciselocation of the zero crossing point, in terms of its time of occurrence,may be calculated by interpolation, Referring to FIG. 51, which showssample points on either side of a zero crossing, if sample value va isbelow the DC level and sample value vb is above, then the time positiont of the zero crossing Z may be simply calculated by:

${tz} = {{ta} + {{va}\frac{{tb} - {ta}}{{vb} - {va}}}}$

Peak Centre Location

Referring to FIG. 52, once the zero-crossing points on either side of apeak tz1 and tz2 have been located, it is a simple matter to calculatethe location of the centre of the peak tp, as follows. Assuming that thepeak is symmetrical about its peak value, then

${tp} = \frac{{{tz}\; 1} + {{tz}\; 2}}{2}$

The routines and methods described above may be used to replace someanalog circuitry on the ultrasonic flow sensor in accordance with analternate embodiment of the invention. These routines and methods mayfeed into the analog routines described above providing raw data whichis presently available through the use of analog circuitry.

The purely digital, sampled approach has the benefit of reduced hardwarecomplexity as well as a possible reduction in cost of goods asanalog-to-digital converters and high-speed processors drop in price.

While this invention has been described in connection with specificembodiments thereof, it will be understood that it is capable of furthermodification(s). This application is intended to cover any variationsuses or adaptations of the invention following in general, theprinciples of the invention and comprising such departures from thepresent disclosure as come within known or customary practice within theart to which the invention pertains and as may be applied to theessential features hereinbefore set forth.

As the present invention may be embodied in several forms withoutdeparting from the spirit of the essential characteristics of theinvention, it should be understood that the above described embodimentsare not to limit the present invention unless otherwise specified, butrather should be construed broadly within the spirit and scope of theinvention as defined in the appended claims. Various modifications andequivalent arrangements are intended to be included within the spiritand scope of the invention and appended claims. Therefore, the specificembodiments are to be understood to be illustrative of the many ways inwhich the principles of the present invention may be practiced. In thefollowing claims, means-plus-function clauses are intended to coverstructures as performing the defined function and not only structuralequivalents, but also equivalent structures. For example, although anail and a screw may not be structural equivalents in that a nailemploys a cylindrical surface to secure wooden parts together, whereas ascrew employs a helical surface to secure wooden parts together, in theenvironment of fastening wooden parts, a nail and a screw are equivalentstructures.

“Comprises/comprising” when used in this specification is taken tospecify the presence of stated features, integers, steps or componentsbut does not preclude the presence or addition of one or more otherfeatures, integers, steps, components or groups thereof.

1. A method of detecting one or more blocked sampling holes in a pipe ofan aspirated smoke detector system comprising: ascertaining the baseflow of fluid through a particle detector using a flow sensor;monitoring subsequent flow through the particle detector; comparing thesubsequent flow with the base flow; and indicating a fault if thedifference between the base flow and the subsequent flow exceeds apredetermined threshold.
 2. The method of claim 1 wherein the flowsensor is an ultrasonic flow sensor.
 3. The method of claim 1, whereinthe difference between base flow and subsequent flow is compared over alength of time.
 4. The method of claim 1, wherein the flow is determinedaccording to the following general flow calculation:f=s×A where f=volumetric flow; A=cross sectional area of an air flowpath through the detector system; s=speed of air through the detectorsystem such that s is given by;$s = {\frac{d}{2}\left( {\frac{1}{t_{2}} - \frac{1}{t_{1}}} \right)}$where t₁ is the transit time of a signal transmitted in a forwarddirection, being generally in the direction of flow, from a firsttransducer located adjacent the flow path to a second transducer locatedgenerally opposite the first transducer and adjacent the flow path; t₂is the transit time of a signal transmitted in a reverse direction,being generally against the direction of flow, from the secondtransducer to the first transducer; and d is a distance travelled by thesignal between the first and second transducer.
 5. An aspirated smokedetector comprising a particle detector, a sampling network and anaspirator, an inlet, an outlet and a flow sensor, wherein the flowsensor uses ultrasonic waves to detect the flow rate of air entering theparticle detector.
 6. The detector of claim 5, wherein the flow sensormeasures the partial flow of fluid through a sampling network.
 7. Thesmoke detector of claim 5, wherein the particle detector detectsparticles in a portion of the air flow flowing through the samplingnetwork.
 8. The smoke detector of claim 5, wherein the flow sensor islocated in the sampling network.
 9. The smoke detector of claim 5,wherein the flow sensor is located in a housing for the particledetector.
 10. The smoke detector of claim 6, having a branch in theinlet allowing air to bypass the particle detector.
 11. A computerprogram product comprising: a computer usable medium having computerreadable program code and computer readable system code embodied on saidmedium for detecting one or more blocked sampling holes in a pipe of anaspirated smoke detector system within a data processing system, saidcomputer program product comprising: computer readable code within saidcomputer usable medium for performing the method steps of claim 1.